====== goToParent() ======

The function ''goToParent()'' redirects the respondent back to the questionnaire (and record) from which he was redirected to the current questionnaire using ''[[:en:create:functions:gotoquestionnaire]]''.

''void|string **goToParent**([string //Mode//], [mixed //Data//])''

The function either redirects the respondent directly to the parent questionnaire or (if '''url''' mode is used) returns the URL with which the respondent can return to the parent questionnaire.

  * //Mode// (optional)
    * '''leave''' -- (default) Complete the child interview and return to the parent questionnaire.
    * '''go''' -- Return to the parent questionnaire (a later continuation of the subordinate interview on the following page is possible).
    * '''url''' -- Return only the URL of the parent interview. This URL can be integrated e.g. by [[:en:create:placeholders]] as a link or button on the questionnaire page (also in the layout). The URL remains the same on all pages of the subordinate questionnaire, so a placeholder may only need to be prepared once at the beginning.
  * //Data// (optional)\\ Optionally, data can be transferred to the parent questionnaire and used there via ''goToResponse()''.

**Note:** If the current interview was not started by ''goToQuestionnaire()'' an error is displayed.